package com.mlethe.android.demo.recyclerview.adapter;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.mlethe.demo.recyclerview.adapter.R;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.simple_btn).setOnClickListener(this);
        findViewById(R.id.header_and_footer_btn).setOnClickListener(this);
        findViewById(R.id.view_pager_btn).setOnClickListener(this);
        findViewById(R.id.view_pager_btn_new).setOnClickListener(this);
        findViewById(R.id.expandable_btn).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        if (id == R.id.simple_btn) {
            Intent intent = new Intent(this, RecyclerAdapterSimpleActivity.class);
            startActivity(intent);
        } else if (id == R.id.header_and_footer_btn) {
            Intent intent = new Intent(this, HeaderAndFooterActivity.class);
            startActivity(intent);
        } else if (id == R.id.view_pager_btn) {
            Intent intent = new Intent(this, ViewPagerActivity.class);
            startActivity(intent);
        } else if (id == R.id.view_pager_btn_new) {
            Intent intent = new Intent(this, NewViewPagerActivity.class);
            startActivity(intent);
        } else if (id == R.id.expandable_btn) {
            Intent intent = new Intent(this, ExpandableUseActivity.class);
            startActivity(intent);
        }
    }
}